<div aria-hidden="true" aria-labelledby="myModalLabel" role="dialog" tabindex="-1" class="modal hide fade" id="box-msg-<?php echo $model->user_id ?>">
    <div class="modal-header">
	<button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button>
	<h3 id="myModalLabel">Send message to "<?php echo $model->username ?>"</h3>
    </div>
    <form method="post" action="" enctype="multipart/formdata" class="form-msg">
	<div class="modal-body">
	    <div class="announce"></div>	    
	    <input type="hidden" value="<?php echo $model->username ?>" name="Mailbox[to]">
	    <input type="text" placeholder="Subject" name="Mailbox[subject]" style="width: 97.2%;" class="subject-mg">
	    <textarea placeholder="Enter message here..." name="Message[text]" style="margin: 0px 0px 10px; width: 516px; height: 101px;" class="message-mg"></textarea>
	</div>
	<div class="modal-footer">
	    <div class='wrap-input-social wrap-input-social-in-view'>
		<?php
		/*		 * ***********************************
		 * Connent or post to Social
		 */
		if ($modelSocial) {
		    ?>
    		<input type='checkbox' name='isSendFacebook'/> Send to Facebook
		<?php } else { ?>
    		<a class='connect-facebook' href='javascript:void()' title='Connect facebook to send this message to your wall'>Connect facebook</a>

		<?php } ?>
	    </div>
	    <button aria-hidden="true" data-dismiss="modal" class="btn">Close</button>
	    <input type="submit" id="send-msg" name="send-msg" value="Send" class="btn btn-primary">
	</div>
    </form>
</div>


<div class="container content">
    <div class="trong-content">
	<div class="left">
	    <?php $this->renderPartial('//layouts/menu_left'); ?>
	</div><!--left-->
	<div class="center">

	    <div class="box update-account-box">
		<div class="new-mem">

		    <div class="title">
			<?php echo $model->username ?>'s profile
			<div class="tool-send">
			    <a class="btn btn-primary btn-small chat-with" receiver="<?php echo $model->user_id ?>" user-name="<?php echo $model->username ?>" id-user="<?php echo $model->user_id ?>">Chat</a>			
			    <?php if (!$checkList) { ?>
    			    <a class="btn btn-primary btn-small flirt-user" receiver="<?php echo $model->user_id ?>">Flirt</a>			
			    <?php } ?>
			    <a class="btn btn-primary btn-small show-box-msg" href="<?php
			    if (time() > user()->getModel()->expired_time_msg) {
				echo url('paypal');
			    } else {
				echo '#box-msg-' . $model->user_id;
			    }
			    ?>">Send message</a>

			</div>
		    </div>

		    <div class="wrap-avatar-edit">
			<img src="<?php echo $model->getAvatarUrl('large'); ?>"/>
		    </div>
		    <br>
		    <div class='title-menu'>Information</div>
		    <table>
			<tr>
			    <td class='label-column-edit-user'>Birthday: </td>
			    <td><?php echo date('d-m-Y', strtotime($model->birthday)); ?></td>
			</tr>
			<tr>
			    <td  class='label-column-edit-user'>Height</td>
			    <td><?php
				$aHeights = User::getListHeight();
				echo $aHeights[$model->height];
				?>
			    </td>
			</tr>
			<tr>
			    <td  class='label-column-edit-user'>Marital Status</td>
			    <td><?php
				$aMaritals = User::getListMarital();
				echo $aMaritals[$model->marital];
				?></td>
			</tr>
			<tr>
			    <td  class='label-column-edit-user'>Ethnicity</td>
			    <td><?php
				$aEthnicitys = User::getListEthnicity();
				echo $aEthnicitys[$model->ethnicity];
				?></td>
			</tr>
			<tr>
			    <td  class='label-column-edit-user'>Relationship</td>
			    <td><?php
				$aRelations = User::getListRelationship();
				echo $aRelations[$model->relationship];
				?></td>
			</tr>
			<tr>
			    <td  class='label-column-edit-user'>Zodiac</td>
			    <td><?php
				$aZodiac = User::getListZodiac();
				echo $aZodiac[$model->zodiac];
				?></td>
			</tr>
			<tr>
			    <td  class='label-column-edit-user'>Smoking Preference</td>
			    <td><?php
				$aSmokings = User::getListSmoking();
				echo $aSmokings[$model->smoking];
				?></td>
			</tr>   
			<tr>
			    <td  class='label-column-edit-user'>General Build</td>
			    <td><?php
				$aBuilds = User::getListBuild();
				echo $aBuilds[$model->general_build];
				?></td>
			</tr>
			<tr>
			    <td  class='label-column-edit-user'>Children</td>
			    <td><?php
				$aChildren = User::getListChildren();
				echo $aChildren[$model->children];
				?></td>
			</tr>
			<tr>
			    <td  class='label-column-edit-user'>Religion</td>
			    <td><?php
				$aReligions = User::getListReligion();
				echo $aReligions[$model->religion];
				?></td>
			</tr>
		    </table>

		    <?php
		    /*		     * ************************Greeting*********************** */
		    ?>
		    <div class='title-menu'>Greeting</div>
		    <div class="wrap-greeting">
			<?php
			foreach (Question::getGreetings() as $key => $value) {

			    if (isset($model->more_info[$key])) {
				?>
				<div>
				    <div><?php echo h($value) ?></div>
				    <?php
				    echo h($model->more_info[$key]);
				    ?>
				</div>
			    <?php } ?>
    			<br>
			    <?php
			}
			?>
		    </div>
		    <?php
		    /*		     * ************************Question*********************** */
		    ?>
		    <div class='title-menu'>Question</div>
		    <div class="wrap-greeting">
			<?php
			foreach (Question::getQuestions() as $question) {
			    if (isset($model->more_info[$question['question_id']]) && $model->more_info[$question['question_id']]) {
				?>
				<div>
				    Q: <?php echo $question['text'] ?><br>
				    A: <?php echo $model->more_info[$question['question_id']]; ?>
				</div>
				<br>
				<?php
			    }
			}
			?>
		    </div>		    

		</div>		
	    </div><!--box-->

	</div><!--center-->
	<div class="right">

	    <?php $this->widget('application.widgets.leftprofile.PercentComplete') ?>
	    <?php $this->widget('application.widgets.leftprofile.Interested'); ?>

	</div><!--right-->

    </div><!--trong-content-->


</div><!--content-->
